function config = getSkelGraphConfig( imSkel )

 % Identifies whethr the graph consists of one loop with two branche off of
 % it, or one loop with one branch that brnaches again.
 %Config 
    % 1 = alpha
    % 2 - omega
          
    %Get the number of endpoints
    endpoints = bwmorph(imSkel, 'endpoints');
    [row ,col]  = find(endpoints);
    endpoint = [row,col];
    endpoint1 = endpoint(1,:);
    endpoint2 = endpoint(2,:);

    %Get the number of branchpoints
    branchpoints = bwmorph(imSkel, 'branchpoints');
    [row ,col]  = find(branchpoints);
    branchpoint = [row,col];
  

          
    %Assume 2 branchpoints, 2 endpoints, and 4 segments 
       
    segments  = getSegmentLists( imSkel );
    
        
    usedSegments = [];

    %Identify segments 1 and 2 that have the endpoints
    for k = 1:length(segments)

        pixelList = segments(k).PixelList;

        %Segment 1 is associated with endpoint 1
        if ~isempty(find(ismember(endpoint1,pixelList,'rows')))
            segment1 = pixelList;
            usedSegments = [usedSegments,k];

         %Segment2 is associated with endpoint 2
        elseif  ~isempty(find(ismember(endpoint2,pixelList,'rows')))
            segment2 = pixelList;
            usedSegments = [usedSegments,k];
        else
            %do nothing
        end
    end
    
            
    %Determine which configuration by determining whether segment 1 and 2
    %connect to the same branchpoint
    if (    isequal( ismember(branchpoint(1,:), segment1,'rows'),[1])...
          && isequal(ismember(branchpoint(1,:), segment2,'rows'),[1]))...
            ||...
        (    isequal(ismember(branchpoint(2,:), segment1,'rows'),[1])...
          && isequal(ismember(branchpoint(2,:), segment2,'rows'),[1]) )

        config =2; % 'omega';
    else
        config = 1; %'alpha';
    end
   
  
end

